package com.yk.neon.lib.util.result.exception;


import com.yk.neon.lib.util.result.HttpCode;

public class BuzException extends RuntimeException implements BasicException {

	private final transient HttpCode httpcode;
	private final transient Object data;

	public BuzException(String message) {
		this(HttpCode.SERVER_ERROR, message, null, null);
	}

	public BuzException(String message, Object data) {
		this(HttpCode.SERVER_ERROR, message, data, null);
	}

	public BuzException(HttpCode code, String message) {
		this(code, message, null, null);
	}

	public BuzException(HttpCode code, String message, Object data) {
		this(code, message, data, null);
	}

	public BuzException(String message, Throwable cause) {
		this(HttpCode.SERVER_ERROR, message, null, cause);
	}

	public BuzException(String message, Object data, Throwable cause) {
		this(HttpCode.SERVER_ERROR, message, data, cause);
	}

	public BuzException(HttpCode code, String message, Object data, Throwable cause) {
		super(message, cause);
		this.httpcode = code;
		this.data = data;
	}

	@Override
	public HttpCode getHttpCode() {
		return httpcode;
	}

}
